Repository navigation
Move TuiCode to Terminal.Gui 2.5 and MentalDesk.Tui 0.2.0 - #472
Merged
Merged
Conversation
TG 2.5 replaces ConfigurationManager with TuiConfigurationBuilder, so
DefaultSettingsService loads the bundled themes through
TuiConfigurationBuilder.Shared, and themes.json is converted to the
nested shape 2.5 requires (it skips the old one with only a warning).
A saved {"Theme": ...} file and the keybindings file load unchanged.
Two runtime changes needed fixing:
- TextView.Text is no longer virtual, so EditorTextView hides it.
- A tab header measured its new title against its old size constraint,
so neighbouring headers overlapped after a title change (the dirty
marker). PaneTabs.ShowTitle sets the header's text and clears the
constraint before re-measuring; editor and diff tabs both use it.
TerminalGuiInternalsTests checks that every [UnsafeAccessor] and
reflected field still finds its TG member, so a rename fails a test
rather than an edit. TextView.Drawing.cs in 2.5 still walks to EOF and
its draw logic is unchanged, so the bounded copy stays. Esc still
doesn't quit after a theme switch, now covered by a test.
Closes #442
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
4 tasks
Contributor
|
Why are you not addressing the CI issues here? |
Contributor
|
Still waiting for you to pick this up. |
Attached to a terminal, TG 2.5's ANSI driver sizes itself from it rather than defaulting to 80x25, so on Windows CI the gutter, tall-file scrollbar and command-line position tests drew into the console's own size. Pinning 80x25 makes them independent of the console. Reproduced on macOS by running the tests under a pty. Closes #442 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Contributor
Author
|
Sorry, both comments went unanswered: an earlier run worked on a fix but never pushed it, and that fix was wrong anyway. Fixed in 38c892c. On TG 2.5 the ANSI driver takes its size from the console it's attached to, so on Windows CI four host tests drew at the console's size, not 80×25. They now pin their size. I reproduced the failure on macOS by running them under a pty; they fail there before this change and pass after it. CI is running again, and I'll mark this ready once it's green. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TuiCode now runs on Terminal.Gui 2.5.0 and MentalDesk.Tui 0.2.0, so it can take library releases again. Nothing should look or work differently: the four themes, a saved theme, saved keybindings, menus, help and the dirty marker all match a build of
mainside by side.Closes #442
Notes for review:
themes.jsonis converted to 2.5's nested shape. It's the same themes, reformatted, so the diff is large.TextViewis obsolete in 2.5, which adds CS0618 warnings throughout, as Move TuiCode to Terminal.Gui 2.5 and MentalDesk.Tui 0.2.0 #442 expected.●dirty marker), the next tab's header overlapped it.PaneTabs.ShowTitlefixes it for editor and diff tabs, andEditorTabDirtyTestscaught it.a-team try tuicode 472